import { User } from './user';
import { Define, EntityObjectFactory } from 'tiny-entity2';
import { Role } from './role';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: "accountroles" })
export class AccountRoles extends EntityObjectType<AccountRoles>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    accountId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    roleId: string;

    @Define.Mapping({
        Mapping: 'Role',
        MappingKey: 'id'
    })
    role: Role;

    user: User;
} 